﻿using ProjectFootball.MVC.Foundation.ResourceLibrary;
using ProjectFootball.MVC.Models.EntityFramework.Entities;
using System.Security.Principal;

namespace ProjectFootball.MVC.Areas.CompetitionArea.Models
{
    public static class _CompetitionDataModelExtensions
    {
        public static Competition CreateNew(this CompetitionDataModel dataModel, IPrincipal user, CreateType createType)
        {
            return new Competition(user, createType, dataModel.ApprovalGuid, dataModel.CompetitionName, dataModel.CompetitionType, dataModel.LocationType,
                dataModel.CountryGuid, dataModel.ActiveFrom, dataModel.ActiveTo);
        }
    }
}